/*
Authors: Eli Yucht 300388949 and Lior Fass 300069705
Project: SCP (Switch Schedule Policy)
Description: Scheduler Interface
*/


#ifndef DRR_SCHEDULER_H
#define DRR_SCHEDULER_H

#include "Scheduler.h"

/*	Deficit Round-Robin Scheduler class declaration
	DRR_Scheduler is a subclass of Scheduler and therefore
	inherit  all it's public and protected members.

	DRR_Scheduler supply implementation of ScheduleCurrentFlow() method
	according to Deficit Round-Robin algorithm.
	In addition it override the HandleAllEmpty() and HandledCurrentFlowEmpty()
	functions by adding special treatment to the credit
*/
class DRR_Scheduler : public Scheduler
{
public:

	int ScheduleCurrentFlow();

protected:
	int HandleAllEmpty();
	void HandleCurrentFlowEmpty();

private:
	void EmptyAllCredit();
	void EmptyCurrentCredit();

};

#endif // DRR_SCHEDULER_H